<?php 
/**
 * PHP versions 4 and 5
 * MagicPHP
 * Licensed under The Open Group Test Suite License
 * Redistributions of files must retain the above copyright notice.
 * @copyright     Copyright 2011
 * @link          
 * @package       Model
 * @since         MaginPHP 1.0
 * @license     
 */
?>
<?php
	/**
	 * @desc: This file is used to write log file 
	 * @author aNKIT kHAMBHATA
	 * @version: 1.0
	 */ 
	Class Magic_Log_Model {
		/**
		 * @desc: this function is used To write log file 
		 * @param $msg : message 
		 * @param $username: username
		 */
	    public function writeLog($msg,$username ='random',$file) {
                                        $date = date('d.m.Y h:i:s');
                                        $log = "[Message] :".$msg."   |  Date:  ".$date."  |  User:  ".$username."\n";
                                        error_log($log, 3,$file);
                                    }
	}
	
	
	//$log->general($msg); //use for general errors
?>